import request from "../utils/request";

// 角色资源接口----------------------------------

// 获取用户角色列表
export const fetchRoleResourceData = (params) => {
  return request({
    url: "/web/roleResource/getList",
    method: "get",
    params: params,
  });
};

// 获取系统资源和按钮
export const fetchgetRoleResource = (params) => {
  return request({
    url: "/web/roleResource/getRoleResource",
    method: "get",
    params: params,
  });
};

// 创建/修改用户角色
export const fetchRoleResourceCreate = (data) => {
  return request({
    url: "/web/roleResource/create",
    method: "post",
    data: data,
  });
};

// 删除用户角色
export const fetchDeleteRoleResource = (data) => {
  return request({
    url: "/web/roleResource/deleteById",
    method: "post",
    data: data,
  });
};

// 获取用户角色详情
export const fetchRoleResourceDetail = (params) => {
  return request({
    url: "/web/roleResource/getDetail",
    method: "get",
    params: params,
  });
};
